<?php



class RingtoneDownloadMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.RingtoneDownloadMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('ringtone_download');
		$tMap->setPhpName('RingtoneDownload');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('RINGTONE_ID', 'RingtoneId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('USER_ID', 'UserId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('TO_PHONE', 'ToPhone', 'string', CreoleTypes::VARCHAR, false, 20);

		$tMap->addColumn('PRICE', 'Price', 'int', CreoleTypes::SMALLINT, true, null);

		$tMap->addColumn('AMOUNT', 'Amount', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('DOWNLOAD_DATETIME', 'DownloadDatetime', 'int', CreoleTypes::TIMESTAMP, false, null);

		$tMap->addColumn('TYPE', 'Type', 'int', CreoleTypes::TINYINT, false, null);

		$tMap->addColumn('MESSAGE', 'Message', 'string', CreoleTypes::VARCHAR, false, 500);

		$tMap->addColumn('SOURCE_TYPE', 'SourceType', 'string', CreoleTypes::VARCHAR, false, 20);

		$tMap->addColumn('FROM_PHONE', 'FromPhone', 'string', CreoleTypes::VARCHAR, false, 20);

	} 
} 